<%@ include file="/common/taglibs.jsp" %>
<head>
	<title><spring:message code="pickingLists.receivedPickingList.header"/></title>
	<script type="text/javascript">
	var reg = /^-{0,1}\d+$/;
	$(function(){
		$("#myForm").submit(function(){
			var pass = true;
			$("#orderId, #pickingListSequence").each(function(){
				if(!reg.test($(this).val())){
					alert($(this).val() + " is invalid, must be digits");
					$(this).focus();
					pass = false;
					return false;
				}
			});
			return pass;
		});
	});
	</script>
</head>
<h1><spring:message code="pickingLists.receivedPickingList.header"/></h1>
<p></p>
<form id="myForm" action="<spring:url value='/pickingLists/receivePickingList.html'/>" method="post">
<table>
	<tr>
		<td colspan="2">
		<c:if test="${!empty param.normalMsg}">
			<div class="ui-widget" id="normalMsg">
				<div style="margin-top: 20px; padding: 0 .7em;" class="ui-state-highlight ui-corner-all"> 
					<div><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-info"></span>
					<font>${param.normalMsg}</font></div>
				</div>
			</div>
		</c:if>
		<c:if test="${!empty param.errorMsg}">
			<div class="ui-widget" id="errorMsg">
				<div style="padding: 0 .7em;" class="ui-state-error ui-corner-all"> 
					<div><span style="float: left; margin-right: .3em;" class="ui-icon ui-icon-alert"></span> 
					<font>${param.errorMsg}</font></div>
				</div>
			</div>
		</c:if>
		</td>
	</tr>
	<tr>
		<td><spring:message code="pickingLists.receivedPickingList.id"/></td>
		<td><input type="text" name="orderId" id="orderId" value="${param.orderId}"/> - 
		<input type="text" name="pickingListSequence" id="pickingListSequence" value="${param.pickingListSequence}"/></td>
	</tr>
	<tr>
		<td colspan="2" style="text-align: right;">
		<button style="margin-right: 10px;" class="aButton"><spring:message code="pickingLists.receivedPickingList.submit"/></button>
		</td>
	</tr>
</table>
</form>